﻿<!--
https://github.com/netnr
2022-10
-->

<!DOCTYPE html>
<html lang="zh-cn" class='sl-theme-light netnrmd-light'>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
            <meta name='keywords' content='NET牛人,Netnr,SQL 格式化' />
            <meta name='description' content='NET牛人,Netnr,脚本服务,Script Services,工具箱,美化 SQL 语句' />

    <title>SQL &#x683C;&#x5F0F;&#x5316; NET牛人</title>

    <link rel='shortcut icon' href='/favicon.ico' type='image/x-icon' />
<link href='https://ss.netnr.com/bootstrap@5.2.2/dist/css/bootstrap.min.css' rel='stylesheet' async />

    <link href="/app/blog/dist/all.css?v=_0J1Z05gYDHZvs0TcVouj90G3JcLkWwwo_3smoSKH-k" rel="stylesheet" />
    <script src="/app/blog/dist/all.js?v=pdXbZGA0pjsmi6dbIAckfyJYPsviDIH7VPLX4qnQjYE"></script>
</head>
<body>
        
    <nav class="nr-navbar navbar navbar-expand-lg navbar-light bg-light">
        <div class="container-fluid">
            <a class="navbar-brand text-decoration-none" href="https://www.netnr.com">
                <img src="/favicon.ico" style="height:1.3em;vertical-align:sub" />
                <span class="d-none d-sm-inline-block">Netnr</span>
            </a>
            <a class='small d-block d-lg-none' href="/sqlformatter" title='SQL &#x683C;&#x5F0F;&#x5316;'>
                <b style="color:var(--sl-color-warning-600)">SQL &#x683C;&#x5F0F;&#x5316;</b>
            </a>

            <button class="nr-navbar-toggler navbar-toggler" aria-label="navbar toggler">
                <sl-animation easing="ease-in-out" duration="1500" play>
                    <span class="navbar-toggler-icon"></span>
                </sl-animation>
            </button>

            <div class="collapse navbar-collapse">
                <ul class="navbar-nav me-auto">
                    <li class="nav-item mx-2">
                        <a class='nav-link active' href="/" title="ss.js.org">
                            <sl-animation class="nr-sla-ss" name="tada" easing="ease-in-out" duration="10000" play>
                                <div class="fw-bold">SS</div>
                            </sl-animation>
                        </a>
                    </li>
                        <li class="nav-item mx-2">
                            <a class='nav-link' href="/sqlformatter" title='SQL &#x683C;&#x5F0F;&#x5316;'>
                                <b style="color:var(--sl-color-warning-600)">SQL &#x683C;&#x5F0F;&#x5316;</b>
                            </a>
                        </li>
                </ul>

                <ul class="navbar-nav">
                    <li class="nav-item">
                        <sl-icon-button class="mt-1" name="cloud-moon" data-action="theme"></sl-icon-button>
                    </li>
                </ul>
            </div>

            <!--mobile-->
            <sl-drawer label="Netnr" class="nr-navbar-drawer" style="--size: 14em;--body-spacing: 0;display: none">
                <sl-menu>
                    <sl-menu-item data-href="/">SS</sl-menu-item>

                        <sl-menu-item data-href="/sqlformatter">SQL &#x683C;&#x5F0F;&#x5316;</sl-menu-item>
                    <sl-divider></sl-divider>
                    <sl-menu-item data-action="theme"><sl-icon name="cloud-moon" slot="prefix"></sl-icon>Dark mode</sl-menu-item>
                </sl-menu>
            </sl-drawer>
        </div>
    </nav>

    <div class="nr-card-box invisible container-fluid p-4">
    <div class="row">
        <div class="col-xxl-2 col-lg-3 col-md-4">
            <sl-button class="nr-btn-format mb-3 w-100" variant="warning" title="Shift+Alt+F 快捷格式化">格式化</sl-button>
            <sl-select class="nr-se-language mb-3" label="语言" value="sql">
                <sl-menu-item value="sql">SQL</sl-menu-item>
                <sl-menu-item value="redshift">AWS Redshift</sl-menu-item>
                <sl-menu-item value="bigquery">BigQuery</sl-menu-item>
                <sl-menu-item value="db2">DB2</sl-menu-item>
                <sl-menu-item value="hive">Hive</sl-menu-item>
                <sl-menu-item value="mariadb">MariaDB</sl-menu-item>
                <sl-menu-item value="mysql">MySQL</sl-menu-item>
                <sl-menu-item value="n1ql">N1QL</sl-menu-item>
                <sl-menu-item value="plsql">PL/SQL</sl-menu-item>
                <sl-menu-item value="postgresql">PostgreSQL</sl-menu-item>
                <sl-menu-item value="spark">Spark</sl-menu-item>
                <sl-menu-item value="sqlite">SQLite</sl-menu-item>
                <sl-menu-item value="tsql">Transact-SQL</sl-menu-item>
                <sl-menu-item value="trino">Trino</sl-menu-item>
            </sl-select>
            <sl-select class="nr-se-uppercase mb-3" label="大小写" value="preserve">
                <sl-menu-item value="preserve">不处理</sl-menu-item>
                <sl-menu-item value="upper">大写</sl-menu-item>
                <sl-menu-item value="lower">小写</sl-menu-item>
            </sl-select>
            <sl-select class="nr-se-indentation mb-3" label="缩进模式" value="standard">
                <sl-menu-item value="standard">默认（标准）</sl-menu-item>
                <sl-menu-item value="tabularLeft">靠左</sl-menu-item>
                <sl-menu-item value="tabularRight">靠右</sl-menu-item>
            </sl-select>
            <sl-details class="mb-3" summary="More" open>
                <sl-button target="_blank" variant="text" href="https://sqlformat.darold.net">pgFormatter</sl-button>
                <sl-button target="_blank" variant="text" href="http://sql-format.com">Devart For SQLServer</sl-button>
                <sl-button target="_blank" variant="text" href="https://www.red-gate.com/website/sql-formatter">Reg-Data For SQLServer</sl-button>
            </sl-details>
        </div>
        <div class="col-xxl-10 col-lg-9 col-md-8">
            <div class="nr-editor"></div>
        </div>
    </div>
</div>

<script src='https://ss.netnr.com/sql-formatter@11.0.2/dist/sql-formatter.min.js'></script>
<script src='https://ss.netnr.com/monaco-editor@0.34.0/min/vs/loader.js'></script>

<script>
    var meRequire = require;

    require.config({
        paths: {
            vs: 'https://ss.netnr.com/monaco-editor@0.34.0/min/vs'
        },
        'vs/nls': { availableLanguages: { '*': 'zh-cn' } }
    });
</script>
                        

            <script src="/js/ss/sqlformatter.js?v=g1rz4-Y-lK0jl1Fe6gFCmIgJtu-r80rQdfUnElO6HNc"></script>
</body>
</html>
